package 单例模式.内部类单例模式;


public class Singleton {
    private Singleton() {
    }

    private static class SingletonFacotry {
        private static Singleton INSTANCE = new Singleton();
    }

    public static Singleton getInstance() {
        return SingletonFacotry.INSTANCE;
    }
}
